package com.kaishengit.pojo;

import java.util.List;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Entity;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
//import org.hibernate.annotations.Entity;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="t_mail")
//@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Mail {
	private String mailid;
	private String mail;
	private String createtime;
	private String sendman;
	private int mailnum;
	private String mailtitle;
	
	private List<Contact> contactList;
	
	
	//set get
	@Id
	@GenericGenerator(name="PK",strategy="uuid")
	@GeneratedValue(generator="PK")
	public String getMailid() {
		return mailid;
	}
	public void setMailid(String mailid) {
		this.mailid = mailid;
	}
	public void setMail(String mail) {
		this.mail = mail;
	}
	public String getMail() {
		return mail;
	}
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	public String getSendman() {
		return sendman;
	}
	public void setSendman(String sendman) {
		this.sendman = sendman;
	}
	public int getMailnum() {
		return mailnum;
	}
	public void setMailnum(int mailnum) {
		this.mailnum = mailnum;
	}
	public String getMailtitle() {
		return mailtitle;
	}
	public void setMailtitle(String mailtitle) {
		this.mailtitle = mailtitle;
	}
	
	
	
	public void setContactList(List<Contact> contactList) {
		this.contactList = contactList;
	}
	@OneToMany(mappedBy="mail")
	public List<Contact> getContactList() {
		return contactList;
	}
	
	
	
	
}
